/*
 * Game.h
 *
 *  Created on: 23.06.2012
 *      Author: sebastian
 */

#ifndef GAME_H_
#define GAME_H_

#include <vector>
#include "Game/Player.h"
#include "Game/World/Universe.h"
#include "utils/TSingleton.h"
#include <string>
#include <list>


//TODO: eventhandler class  die in einer endlosschleife in einem thread nebenherläuft und building events usw. fertig stellt.
class Game : public TSingleton<Game> {
private:
	std::vector<Player*> players_;
	Universe *universe_;

public:
	Game();
	void init();

	virtual ~Game();

	bool login(const std::string &name, const std::string &pass, const std::string &IP);

	Universe * getUniverse();

	Player * getPlayerByName(const std::string &name);
	Player * getPlayerBySessionID(const int sessId);

	Time getTime();

};



#define g_pGame Game::get()

#endif /* GAME_H_ */
